home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / contrib / dvx / inc / x11 / xaw / simpleme.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-15  |  4.9 KB  |  145 lines

  1. /*
  2.  * $XConsortium: SimpleMenu.h,v 1.17 89/12/11 15:01:55 kit Exp $
  3.  *
  4.  * Copyright 1989 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  * Author:  Chris D. Peterson, MIT X Consortium
  24.  */
  25.  
  26. /*
  27.  * SimpleMenu.h - Public Header file for SimpleMenu widget.
  28.  *
  29.  * This is the public header file for the Athena SimpleMenu widget.
  30.  * It is intended to provide one pane pulldown and popup menus within
  31.  * the framework of the X Toolkit.  As the name implies it is a first and
  32.  * by no means complete implementation of menu code. It does not attempt to
  33.  * fill the needs of all applications, but does allow a resource oriented
  34.  * interface to menus.
  35.  *
  36.  * Date:    April 3, 1989
  37.  *
  38.  * By:      Chris D. Peterson
  39.  *          MIT X Consortium 
  40.  *          kit@expo.lcs.mit.edu
  41.  */
  42.  
  43. #ifndef _SimpleMenu_h
  44. #define _SimpleMenu_h
  45.  
  46. #include <X11/Shell.h>
  47. #include <X11/Xmu/Converters.h>
  48.  
  49. /****************************************************************
  50.  *
  51.  * SimpleMenu widget
  52.  *
  53.  ****************************************************************/
  54.  
  55. /* SimpleMenu Resources:
  56.  
  57.  Name             Class        RepType        Default Value
  58.  ----             -----        -------        -------------
  59.  background         Background        Pixel        XtDefaultBackground
  60.  backgroundPixmap    BackgroundPixmap    Pixmap          None
  61.  borderColor         BorderColor    Pixel        XtDefaultForeground
  62.  borderPixmap         BorderPixmap    Pixmap        None
  63.  borderWidth         BorderWidth    Dimension    1
  64.  bottomMargin        VerticalMargins    Dimension       VerticalSpace
  65.  columnWidth         ColumnWidth        Dimension       Width of widest text
  66.  cursor              Cursor             Cursor          None
  67.  destroyCallback     Callback        Pointer        NULL
  68.  height             Height        Dimension    0
  69.  label               Label              String          NULL (No label)
  70.  labelClass          LabelClass         Pointer         smeBSBObjectClass
  71.  mappedWhenManaged   MappedWhenManaged    Boolean        True
  72.  rowHeight           RowHeight          Dimension       Height of Font
  73.  sensitive         Sensitive        Boolean        True
  74.  topMargin           VerticalMargins    Dimension       VerticalSpace
  75.  width             Width        Dimension    0
  76.  x             Position        Position    0n
  77.  y             Position        Position    0
  78.  
  79. */
  80.  
  81. typedef struct _SimpleMenuClassRec*    SimpleMenuWidgetClass;
  82. typedef struct _SimpleMenuRec*        SimpleMenuWidget;
  83.  
  84. extern WidgetClass simpleMenuWidgetClass;
  85.  
  86. #define XtNcursor "cursor"
  87. #define XtNbottomMargin "bottomMargin"
  88. #define XtNcolumnWidth "columnWidth"
  89. #define XtNlabelClass "labelClass"
  90. #define XtNmenuOnScreen "menuOnScreen"
  91. #define XtNpopupOnEntry "popupOnEntry"
  92. #define XtNrowHeight "rowHeight"
  93. #define XtNtopMargin "topMargin"
  94.  
  95. #define XtCColumnWidth "ColumnWidth"
  96. #define XtCLabelClass "LabelClass"
  97. #define XtCMenuOnScreen "MenuOnScreen"
  98. #define XtCPopupOnEntry "PopupOnEntry"
  99. #define XtCRowHeight "RowHeight"
  100. #define XtCVerticalMargins "VerticalMargins"
  101.  
  102. /************************************************************
  103.  *
  104.  * Public Functions.
  105.  *
  106.  ************************************************************/
  107.  
  108. /*    Function Name: XawSimpleMenuAddGlobalActions
  109.  *    Description: adds the global actions to the simple menu widget.
  110.  *    Arguments: app_con - the appcontext.
  111.  *    Returns: none.
  112.  */
  113.  
  114. void 
  115. XawSimpleMenuAddGlobalActions(/* app_con */);
  116. /*
  117. XtAppContext app_con;
  118. */
  119.  
  120. /*    Function Name: XawSimpleMenuGetActiveEntry
  121.  *    Description: Gets the currently active (set) entry.
  122.  *    Arguments: w - the smw widget.
  123.  *    Returns: the currently set entry or NULL if none is set.
  124.  */
  125.  
  126. Widget
  127. XawSimpleMenuGetActiveEntry( /* w */);
  128. /*
  129. Widget w;
  130. */
  131.  
  132. /*    Function Name: XawSimpleMenuClearActiveEntry
  133.  *    Description: Unsets the currently active (set) entry.
  134.  *    Arguments: w - the smw widget.
  135.  *    Returns: none.
  136.  */
  137.  
  138. void
  139. XawSimpleMenuClearActiveEntry(/* w */);
  140. /*
  141. Widget w;
  142. */
  143.  
  144. #endif /* _SimpleMenu_h */
  145.